package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;

import java.util.Date;
import java.util.Objects;

public class UserSubscribe extends DataObject {

	private long userId;
	private int mallId;								//订阅商品编号
	private String orderNo;							//订阅订单号
	private int type;								//订阅类型，0：新订阅 1：续订 2：取消
	private boolean isFree;							//是否试用
	private long expiresTime;						//过期时间戳
	private Date modifyTime;						//变更时间

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setUpdateOption();
		}
	}

	public int getMallId() {
		return mallId;
	}

	public void setMallId(int mallId) {
		if(this.mallId != mallId) {
			this.mallId = mallId;
			setUpdateOption();
		}

	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		if(!Objects.equals(this.orderNo, orderNo)) {
			this.orderNo = orderNo;
			setUpdateOption();
		}
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		if(this.type != type) {
			this.type = type;
			setUpdateOption();
		}
	}

	public boolean isFree() {
		return isFree;
	}

	public void setFree(boolean free) {
		if(isFree != free) {
			isFree = free;
			setUpdateOption();
		}
	}

	public long getExpiresTime() {
		return expiresTime;
	}

	public void setExpiresTime(long expiresTime) {
		if(this.expiresTime != expiresTime) {
			this.expiresTime = expiresTime;
			setUpdateOption();
		}
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		if(this.modifyTime != modifyTime) {
			this.modifyTime = modifyTime;
			setUpdateOption();
		}
	}
}
